package com.bgs.service.impl;

import com.bgs.dao.studentInformationMapper;
import com.bgs.pojo.Areas;
import com.bgs.pojo.Cities;
import com.bgs.pojo.Provinces;
import com.bgs.pojo.studentInformation;
import com.bgs.service.StudenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudenServiceImpl implements StudenService {

    @Autowired
    private studentInformationMapper s;

    //全查
    @Override
    public List<studentInformation> findAllqc() {

        List<studentInformation> stu = s.findAllqc();

        return stu;
    }


    //模糊查
    @Override
    public List<studentInformation> findAll(studentInformation studentInformation) {

        List<studentInformation> stu = s.findAll(studentInformation);

        return stu;
    }

    //添加
    @Override
    public int insertSelective(studentInformation studentInformation) {
        return s.insertSelective(studentInformation);
    }

    //省下拉框
    @Override
    public List<Provinces> provinces() {
        return s.provinces();
    }
    //市下拉框
    @Override
    public List<Cities> cities() {
        return s.cities();
    }
    //县下拉框
    @Override
    public List<Areas> areas() {
        return s.areas();
    }

    @Override
    public int updateByPrimaryKeySelective(studentInformation studentInformation) {
        return s.updateByPrimaryKeySelective(studentInformation);
    }

    @Override
    public int deleteById(Integer id) {
        return s.deleteByPrimaryKey(id);
    }


}
